namespace Galplay {
  internal class ScriptWait : GalScript {
    public int FrameCount { get; }
    public ScriptWait(GalScene owner, XmlNode item) : base(owner, item, ScriptType.Wait) {
      if (int.TryParse(item.InnerText, out var result)) {
        FrameCount = result;
      }
    }


    public override void Execute(GameScenePlayer player) {
      player.SetWaitTime(FrameToTime(FrameCount));
    }
  }
}